#ifndef MASK_H_
#define MASK_H_

#include "include.h"
#include "piece.h"

class Mask
{
public:
	Mask();
	Mask(float, float, int);
	Mask(Piece, int);
	virtual ~Mask();
	
	int countColumns();
	int countRows();
	int getResolution();
	int width();
	int height();
	bool pixelValue(int, int);
	bool overlap(Mask, int, int);
	void setPixelValue(int, int, bool);
	void combine(Mask, int, int);
	void descombine(Mask,int,int);
	void rotateMe();
	void reflectMe(int); 
	void draw(QPainter *, bool);
	int freePixels();
	
private:
	int rows, columns, resolution;
	QVector<bool> pixels;
	void createPixelsBuffer(Piece *);
	
};

#endif /*MASK_H_*/
